<!--
 * @docName: visibleAndHidden.vue
 * @Author: mwl
 * @Date: 2023/12/22
 * @LastEditors: zhongxiong
 * @LastEditTime: 11:35
-->
<template>
<div>
  <div class='dives' v-if='showType'><span>{{value}}</span> <a-icon @click='handoff(showType)' type="eye" /></div>
  <div class='dives' v-else><span>**********</span><a-icon @click='handoff(showType)' type="eye-invisible" /></div>
</div>
</template>

<script>
export default {
  name: 'visibleAndHidden',
  props: {
    value: {
      type: String,
      required: false,
    }
  },
  data() {
    return {
      showType:false
    }
  },
  methods:{
    handoff(type){
      this.showType = !type;
    }

  }
}
</script>

<style scoped lang='less'>
.dives{
  display: flex;
  justify-content: space-between;
  align-items: center;
}
</style>
